package com.karrim.server.util.file.abstr;

import com.google.gwt.user.server.rpc.RemoteServiceServlet;
import com.karrim.shared.util.Message;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @author andrea.cantafio
 */
public abstract class AbstractBlockingRemoteServiceServlet extends RemoteServiceServlet {

    @Override
    protected void doDelete(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        resp.getWriter().println(new Message(Message.DELETE_NOT_ALLOWED));
        resp.flushBuffer();
    }

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        resp.getWriter().println(new Message(Message.GET_NOT_ALLOWED));
        resp.flushBuffer();
    }

    @Override
    protected void doPut(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        resp.getWriter().println(new Message(Message.PUT_NOT_ALLOWED));
        resp.flushBuffer();
    }
}
